using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._SolarRadiation
{
    /// <summary>
    /// <para>Solar Radiation Graphics</para>
    /// <para>Derives raster representations of a hemispherical viewshed, sun map, and sky map, which are used in the calculation of direct, diffuse, and global solar radiation.</para>
    /// <para>派生半球视域、太阳图和天空图的栅格制图，用于计算直接、漫射和全球太阳辐射。</para>
    /// </summary>    
    [DisplayName("Solar Radiation Graphics")]
    public class SolarRadiationGraphics : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SolarRadiationGraphics()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_surface_raster">
        /// <para>Input raster</para>
        /// <para>Input elevation surface raster.</para>
        /// <para>输入高程表面栅格。</para>
        /// </param>
        /// <param name="_out_viewshed_raster">
        /// <para>Output viewshed raster</para>
        /// <para><xdoc>
        ///   <para>The output viewshed raster.</para>
        ///   <para>The resulting viewshed for a location represents which sky directions are visible and which are obscured. This is similar to the view provided by upward-looking hemispherical (fisheye) photographs.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出视域栅格。</para>
        ///   <para>某个位置的最终视域表示哪些天空方向可见，哪些天空方向被遮挡。这类似于向上看的半球形（鱼眼）照片提供的视图。</para>
        /// </xdoc></para>
        /// </param>
        public SolarRadiationGraphics(object _in_surface_raster, object _out_viewshed_raster)
        {
            this._in_surface_raster = _in_surface_raster;
            this._out_viewshed_raster = _out_viewshed_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Solar Radiation Graphics";

        public override string CallName => "sa.SolarRadiationGraphics";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_surface_raster, _out_viewshed_raster, _in_points_feature_or_table, _sky_size, _height_offset, _calculation_directions, _latitude, _time_configuration, _day_interval, _hour_interval, _out_sunmap_raster, _zenith_divisions, _azimuth_divisions, _out_skymap_raster];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>Input elevation surface raster.</para>
        /// <para>输入高程表面栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface_raster { get; set; }


        /// <summary>
        /// <para>Output viewshed raster</para>
        /// <para><xdoc>
        ///   <para>The output viewshed raster.</para>
        ///   <para>The resulting viewshed for a location represents which sky directions are visible and which are obscured. This is similar to the view provided by upward-looking hemispherical (fisheye) photographs.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出视域栅格。</para>
        ///   <para>某个位置的最终视域表示哪些天空方向可见，哪些天空方向被遮挡。这类似于向上看的半球形（鱼眼）照片提供的视图。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output viewshed raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_viewshed_raster { get; set; }


        /// <summary>
        /// <para>Input points feature or table</para>
        /// <para>The input point feature class or table specifying the locations to analyze solar radiation.</para>
        /// <para>指定要分析太阳辐射的位置的输入点要素类或表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input points feature or table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_points_feature_or_table { get; set; } = null;


        /// <summary>
        /// <para>Sky size / Resolution</para>
        /// <para><xdoc>
        ///   <para>The resolution or sky size for the viewshed, sky map, and sun map rasters. The units are cells.</para>
        ///   <para>The default creates a raster of 200 by 200 cells.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>视域、天空地图和太阳地图栅格的分辨率或天空大小。这些单位是单元格。</para>
        ///   <para>默认创建 200 x 200 像元的栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sky size / Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _sky_size { get; set; } = 200;


        /// <summary>
        /// <para>Height offset</para>
        /// <para><xdoc>
        ///   <para>The height (in meters) above the DEM surface for which calculations are to be performed.</para>
        ///   <para>The height offset will be applied to all input locations.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要执行计算的 DEM 表面上方的高度（以米为单位）。</para>
        ///   <para>高度偏移将应用于所有输入位置。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Height offset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _height_offset { get; set; } = 0;


        /// <summary>
        /// <para>Calculation directions</para>
        /// <para><xdoc>
        ///   <para>The number of azimuth directions used when calculating the viewshed.</para>
        ///   <para>Valid values must be multiples of 8 (8, 16, 24, 32, and so on). The default value is 32 directions, which is adequate for complex topography.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>计算视域时使用的方位角方向数。</para>
        ///   <para>有效值必须是 8 的倍数（8、16、24、32 等）。默认值为 32 个方向，这对于复杂的地形来说已经足够了。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Calculation directions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _calculation_directions { get; set; } = 32;


        /// <summary>
        /// <para>Latitude</para>
        /// <para><xdoc>
        ///   <para>The latitude for the site area. The units are decimal degrees, with positive values for the northern hemisphere and negative for the southern.</para>
        ///   <para>For input surface rasters containing a spatial reference, the mean latitude is automatically calculated; otherwise, latitude will default to 45 degrees.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>站点区域的纬度。单位为十进制度，北半球为正值，南半球为负值。</para>
        ///   <para>对于包含空间参考的输入表面栅格，将自动计算平均纬度;否则，纬度将默认为 45 度。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Latitude")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _latitude { get; set; } = null;


        /// <summary>
        /// <para>Time configuration</para>
        /// <para><xdoc>
        ///   <para>Specifies the time period to use for the calculations.</para>
        ///   <bulletList>
        ///     <bullet_item>Special days—Calculates solar insolation for the solstice days (summer and winter) and the equinox days (where the insolation for both spring and fall equinox are the same).</bullet_item><para/>
        ///     <bullet_item>Within day—Performs calculations for a specified time period within one single day.
        ///     <para>Select the Julian Day and enter the start and end times. When the start time and the end time are the same, instantaneous insolation will be calculated. When the start time is before sunrise and the end time is after sunset, insolation will be calculated for the whole day.</para>
        ///     <bulletList>
        ///       <bullet_item>To facilitate entering the correct day, use the calendar button to open the Calendar dialog box.  </bullet_item></bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>Multiple days—Performs calculations for a specific multiple-day period within a year.
        ///     <para>Specify the start year, start day, and end day. When the end day is smaller than the start day, the end day is considered to be in the following year. The default time configuration starts on day 5 and ends on day 160 of the current Julian year.</para>
        ///     <bulletList>
        ///       <bullet_item>To facilitate entering the correct days, use the calendar button to open the Calendar dialog box.  </bullet_item></bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>Whole year—Performs calculations for an entire year using monthly intervals for calculations.
        ///     <para>If the Create outputs for each interval option is checked, output files will be created for each month; otherwise, a single output will be created for the whole year.</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于计算的时间段。</para>
        ///   <bulletList>
        ///     <bullet_item>特殊日子 - 计算冬至日（夏季和冬季）和春分日（春分和秋分的日照相同）的日照。</bullet_item><para/>
        /// <bullet_item>在一天内 - 在一天内执行指定时间段的计算。
        ///     <para>选择儒略日并输入开始和结束时间。当开始时间和结束时间相同时，将计算瞬时日照。当开始时间在日出之前，结束时间在日落后时，将计算全天的日照。</para>
        ///     <bulletList>
        /// <bullet_item>为了便于输入正确的日期，请使用日历按钮打开“日历”对话框。 </bullet_item></bulletList>
        ///     </bullet_item><para/>
        /// <bullet_item>多天 - 对一年中的特定多日期间执行计算。
        ///     <para>指定开始年份、开始日期和结束日期。当结束日小于开始日时，结束日被视为下一年。默认时间配置从当前儒略年的第 5 天开始，到第 160 天结束。</para>
        ///     <bulletList>
        /// <bullet_item>为了便于输入正确的日期，请使用日历按钮打开“日历”对话框。 </bullet_item></bulletList>
        ///     </bullet_item><para/>
        /// <bullet_item>全年 - 使用每月间隔进行计算，对一整年进行计算。
        ///     <para>如果选中 Create outputs for each interval 选项，则将为每个月创建输出文件;否则，将创建全年的单个输出。</para>
        ///     </bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time configuration")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_configuration { get; set; } = null;


        /// <summary>
        /// <para>Day interval</para>
        /// <para><xdoc>
        ///   <para>The time interval through the year (units: days) used for calculation of sky sectors for the sun map.</para>
        ///   <para>The default value is 14 (biweekly).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一年中用于计算太阳图天空扇区的时间间隔（单位：天）。</para>
        ///   <para>默认值为 14（每两周一次）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Day interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _day_interval { get; set; } = 14;


        /// <summary>
        /// <para>Hour interval</para>
        /// <para><xdoc>
        ///   <para>Time interval through the day (units: hours) used for calculation of sky sectors for sun maps.</para>
        ///   <para>The default value is 0.5.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一天中用于计算太阳图的天空扇区的时间间隔（单位：小时）。</para>
        ///   <para>默认值为 0.5。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Hour interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _hour_interval { get; set; } = 0.5;


        /// <summary>
        /// <para>Output sunmap raster</para>
        /// <para><xdoc>
        ///   <para>The output sun map raster.</para>
        ///   <para>The output is a representation that specifies sun tracks, the apparent position of the sun as it varies through time. The output is at the same resolution as the viewshed and sky map.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出太阳地图栅格。</para>
        ///   <para>输出是指定太阳轨迹的表示，即太阳随时间变化的表观位置。输出的分辨率与视域和天空地图的分辨率相同。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output sunmap raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_sunmap_raster { get; set; } = null;


        /// <summary>
        /// <para>Zenith divisions</para>
        /// <para><xdoc>
        ///   <para>The number of divisions used to create sky sectors in the sky map.</para>
        ///   <para>The default is eight divisions (relative to zenith). Values must be greater than zero and less than half the sky size value.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于在天空图中创建天空扇区的分区数。</para>
        ///   <para>默认值为 8 个分区（相对于天顶）。值必须大于零且小于天空大小值的一半。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Zenith divisions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _zenith_divisions { get; set; } = 8;


        /// <summary>
        /// <para>Azimuth divisions</para>
        /// <para><xdoc>
        ///   <para>The number of divisions used to create sky sectors in the sky map.</para>
        ///   <para>The default is eight divisions (relative to north). Valid values must be multiples of 8. Values must be greater than zero and less than 160.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于在天空图中创建天空扇区的分区数。</para>
        ///   <para>默认值为 8 个分区（相对于北方）。有效值必须是 8 的倍数。值必须大于零且小于 160。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Azimuth divisions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _azimuth_divisions { get; set; } = 8;


        /// <summary>
        /// <para>Output skymap raster</para>
        /// <para><xdoc>
        ///   <para>The output sky map raster.</para>
        ///   <para>The output is constructed by dividing the whole sky into a series of sky sectors defined by zenith and azimuth divisions. The output is at the same resolution as the viewshed and sun map.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出天空地图栅格。</para>
        ///   <para>输出是通过将整个天空划分为一系列由天顶和方位角划分定义的天空扇区来构建的。输出的分辨率与视域和太阳地图的分辨率相同。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output skymap raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_skymap_raster { get; set; } = null;


        public SolarRadiationGraphics SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}